package com.niit;

import com.niit.config.MyContainer;
import com.niit.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {

        ApplicationContext ctx =
                new AnnotationConfigApplicationContext(
                        MyContainer.class);

        UserService userService = ctx.getBean(UserService.class);
        String result = userService.getUserById(1001);
        System.out.println(result);

    }
}
